<template>
  <div class="pt-8">
    <Tabs v-model="activeName">
      <TabPane label="SQL预审" name="submit">
        <page-table height="200" :columns="logViewColumns" :data="submitLog" :max-height="logViewMaxHeight" border size="small" stripe></page-table>
      </TabPane>
      <TabPane v-if="executeLog.length" label="执行前审核" name="execute">
        <page-table height="200" :columns="logViewColumns" :data="executeLog" :max-height="logViewMaxHeight" border size="small" stripe></page-table>
      </TabPane>
      <TabPane v-if="resultLog.length" label="执行结果" name="result">
        <page-table height="200" :columns="logViewColumns" :data="resultLog" :max-height="logViewMaxHeight" border size="small" stripe></page-table>
      </TabPane>
    </Tabs>
  </div>
</template>

<script>
import PageTable from '@/components/PageTable/PageTable'
import { logViewColumns } from '@/views/ticket/order/components/LogView/config'

export default {
  name: 'LogView',
  components: { PageTable },
  props: {
    submitLog: {
      type: Array,
      default() {
        return []
      },
      require: false
    },
    executeLog: {
      type: Array,
      default() {
        return []
      },
      require: false
    },
    resultLog: {
      type: Array,
      default() {
        return []
      },
      require: false
    }
  },
  data() {
    return {
      pageSize: 15,
      pageNum: 1,
      logViewLoading: false,
      logViewMaxHeight: 700,
      logViewColumns: [],
      activeName: 'submit'
    }
  },
  mounted() {
    this.logViewColumns = logViewColumns(this)
    console.log(this.resultLog)
  },
  methods: {}
}
</script>

<style lang='scs' scoped>
</style>
